package com.charlotte.study.gupao.decorator.battercake.v2;

/**
 * @author junjie.ding
 * @date 2020/3/9
 */
public class Test {
    public static void main(String[] args) {

        BaseBatterCake baseBatterCake = new BaseBatterCake();

        EggDecorator eggDecorator = new EggDecorator(baseBatterCake);
        System.out.println(eggDecorator.getMsg() + "\n 价格：" + eggDecorator.getPrice());

        SausageDecorator sausageDecorator = new SausageDecorator(eggDecorator);

        System.out.println(eggDecorator.getMsg() + "\n 价格：" + eggDecorator.getPrice());
        System.out.println(sausageDecorator.getMsg() + "\n 价格：" + sausageDecorator.getPrice());
    }
}
